package day03;

public class OperDemo44 {
    public static void main(String[] args) {
        //4)赋值运算符:=、+=、-=、*=、/=、%=
        int a = 5;
        //相当于a=(int)(a+10)
        a += 10;
        System.out.println(a); //15
        //相当于a=(int)(a*2)  上一个结果的基础之上乘以2
        a *= 2;
        System.out.println(a); //30
        //相当于a=(int)(a/6)   上一个结果的基础上除以6
        a /= 6;
        System.out.println(a); //5

        //小面试题:
        short s = 5;
        //s = s+10; //编译错误，需强转，改为:s=(short)(s+10);
        s += 10; //相当于s=(short)(s+10);

    }
}
